import matplotlib.pyplot as plt

activities=["study","eating","sleeping","playing","working"]
value=[10,1,8,2,4]
explode=[0.1,0.02,0.02,0.02,0.02]#突出显示
#startangle：float，默认：None。如果不是None，从x轴逆时针旋转饼图的开始角度
#autopct：特定的string，默认是None。指定数值的显示方式。
plt.pie(value,labels=activities,explode=explode,autopct='%1.1f%%',shadow="ture",startangle=90)

plt.title("Daily Life")
plt.legend()
plt.show()
